import { useApp } from "@/pinia/modules/app";
import logoImg from "@/assets/logo.svg";
export default defineComponent({
  name: "LogoComponent",
  setup() {
    const { isCollapsed } = storeToRefs(useApp());
    return () => (
      <div
        class={
          isCollapsed.value
            ? "h-[50px] flex items-center justify-center px-[10px] bg-[var(--el-menu-bg-color)]"
            : "h-[50px] flex items-center px-[10px] bg-[var(--el-menu-bg-color)]"
        }
      >
        <img src={logoImg} alt="Logo" class="h-[30px]" />
        {!isCollapsed.value && (
          <span class="text-[var(--el-menu-text-color)] text-[18px] font-bold ml-[10px]">
            食品供应链
          </span>
        )}
      </div>
    );
  },
});
